#!/bin/bash

sudo systemctl isolate multi-user.target
sudo bash ./turnoff1-7.sh

sudo bash ./turnon1-7.sh

sudo bash -c "echo -1 > /proc/sys/kernel/sched_rt_runtime_us"
sudo bash irq_banding.sh
sudo bash task_banding.sh
for idx in {1..7}; do
    sudo bash -c "echo performance>/sys/devices/system/cpu/cpu${idx}/cpufreq/scaling_governor"
done
sudo bash -c "echo '0' > /proc/sys/kernel/nmi_watchdog"
sudo bash -c "echo 3600 > /proc/sys/vm/stat_interval"
sudo bash -c "echo 0 > /proc/sys/kernel/watchdog"
#sudo bash ./turnoff1-7.sh  these lines will halt the system
#sudo bash ./turnon1-7.sh
sudo systemctl stop snapd.socket
sudo systemctl stop snapd.service
sudo systemctl stop whoopsie.service
sudo systemctl stop apache2.service
sudo systemctl stop anacron.timer
sudo systemclt stop systemd-timedated.service
sudo systemctl stop cron.service
sudo systemctl stop systemd-tmpfiles-clean.service
sudo systemctl stop systemd-tmpfiles-clean.timer
